//------------------------------------------------------------------------------
//
// SynchronizedDance Types
//
//------------------------------------------------------------------------------

using Microsoft.Ccr.Core;
using Microsoft.Dss.Core.Attributes;
using Microsoft.Dss.ServiceModel.Dssp;
using System;
using System.Collections.Generic;
using W3C.Soap;
using dance = ProMRDS.Robotics.SynchronizedDance;
using System.ComponentModel;


namespace ProMRDS.Robotics.SynchronizedDance
{
    
    /// <summary>
    /// Synchronized Dance Contract class
    /// </summary>
    public sealed class Contract
    {
        /// <summary>
        /// The Dss Service contract
        /// </summary>
        public const String Identifier = "http://www.promrds.com/contracts/2008/01/synchronizeddance.html";
    }
    /// <summary>
    /// The Synchronized Dance State
    /// </summary>
    [DataContract()]
    public class SynchronizedDanceState
    {
        [DataMember]
        public int CountDown;           // Number of seconds to delay at the start

        [DataMember]
        public int RepeatCount;         // Number of times to repeat dance

        [DataMember]
        public int SettlingTime;        // Time to wait after each move

        [DataMember]
        public bool WaitForMoves;       // Wait for response messages

        [DataMember]
        public bool ControlledMoves;    // Use controlled (not timed) moves

        // Values for the motions using either method
        [DataMember]
        public float DrivePower;        // Power for driving forward

        [DataMember]
        public float RotatePower;


        // Values for "exact" movements using DriveDistance and RotateDegrees
        [DataMember]
        public float DriveDistance;     // Drive 30cm

        [DataMember]
        public float RotateAngle;       // Turn 90 degrees to the left

        [DataMember]
        public int DriveTime;           // Time to drive forward (millisec)
        [DataMember]
        public int RotateTime;          // Time to rotate
    }

    /// <summary>
    /// Synchronized Dance Main Operations Port
    /// </summary>
    [ServicePort()]
    public class SynchronizedDanceOperations : PortSet<DsspDefaultLookup, DsspDefaultDrop, Get>
    {
    }

    /// <summary>
    /// Synchronized Dance Get Operation
    /// </summary>
    public class Get : Get<GetRequestType, PortSet<SynchronizedDanceState, Fault>>
    {
        /// <summary>
        /// Synchronized Dance Get Operation
        /// </summary>
        public Get()
        {
        }
        /// <summary>
        /// Synchronized Dance Get Operation
        /// </summary>
        public Get(Microsoft.Dss.ServiceModel.Dssp.GetRequestType body) : 
                base(body)
        {
        }
        /// <summary>
        /// Synchronized Dance Get Operation
        /// </summary>
        public Get(Microsoft.Dss.ServiceModel.Dssp.GetRequestType body, Microsoft.Ccr.Core.PortSet<SynchronizedDanceState,W3C.Soap.Fault> responsePort) : 
                base(body, responsePort)
        {
        }
    }
}
